<UserControl x:Class="ResourceBlender_Express.ApplicationSelector"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:converters="clr-namespace:ResourceBlender_Express.Converters"
    xmlns:loc="clr-namespace:ResourceBlender_Express"
    Height="230" Width="500">
    <UserControl.Resources>
        <ResourceDictionary>
            <converters:LanguageCodeListConverter x:Key="LanguageCodeListConverter" />
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="3*" />
            <ColumnDefinition Width="3*" />
            <ColumnDefinition Width="3*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="200" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Label Grid.Row="0" Grid.Column="0">Application</Label>
        <ListBox Grid.Row="1" Grid.Column="0" x:Name="lstApplication" 
                 ItemsSource="{Binding}"  
                 Style="{StaticResource ApplicationRadioListTemplate}"
                 SelectionChanged="lstApplication_SelectionChanged"></ListBox>

        <Label Grid.Row="0" Grid.Column="1">Bundles</Label>
        <ListBox Grid.Row="1" Grid.Column="1" x:Name="lstBundles" ItemsSource="{Binding ElementName=lstApplication,Path=SelectedValue.Bundles}" ItemTemplate="{StaticResource DictionaryList}" SelectedValuePath="Key" SelectionMode="Multiple" SelectionChanged="lstBundles_SelectionChanged" />

        <Label Grid.Row="0" Grid.Column="2">Languages</Label>
        <ListBox Grid.Row="1" Grid.Column="2" x:Name="lstLanguages" ItemsSource="{Binding ElementName=lstApplication,Path=SelectedValue.Languages,Converter={StaticResource LanguageCodeListConverter}}" ItemTemplate="{StaticResource DictionaryList}" SelectedValuePath="Key" SelectionMode="Multiple" SelectionChanged="lstLanguages_SelectionChanged" />
    </Grid>
</UserControl>
